Google News
logo
jQuery - Interview Questions
What is the use of serialize() method in JQuery?
The jQuery serialize() method is used to create a text string in standard URL-encoded notation. It serializes the form values so that its serialized values can be used in the URL query string while making an AJAX request.
 
Syntax :

$(document).ready(function(){    
    $("button").click(function(){    
        $("div").text($("form").serialize());    
    });    
});
Advertisement